package cn.stylefeng.guns.modular.deduct.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.deduct.entity.Deduct;
import cn.stylefeng.guns.modular.deduct.model.params.DeductParam;
import cn.stylefeng.guns.modular.deduct.model.result.DeductResult;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 扣费记录表 服务类
 * </p>
 *
 * @author liuqiang
 * @since 2020-02-09
 */
public interface DeductService extends IService<Deduct> {

    /**
     * 新增
     *
     * @author liuqiang
     * @Date 2020-02-09
     */
    void add(DeductParam param);

    /**
     * 删除
     *
     * @author liuqiang
     * @Date 2020-02-09
     */
    void delete(DeductParam param);

    /**
     * 更新
     *
     * @author liuqiang
     * @Date 2020-02-09
     */
    void update(DeductParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author liuqiang
     * @Date 2020-02-09
     */
    DeductResult findBySpec(DeductParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author liuqiang
     * @Date 2020-02-09
     */
    List<DeductResult> findListBySpec(DeductParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author liuqiang
     * @Date 2020-02-09
     */
     LayuiPageInfo findPageBySpec(DeductParam param);

     BigDecimal sumConsumeAmount(DeductParam param);
}
